# -*- codeing = utf-8 -*-
# @Time: 2022/6/26 0:43
# @Author: Foxhuty
# @File: pandas_100.py
# @Software: PyCharm
# @Based on python 3.10

import pandas as pd
import numpy as np


# df_range = pd.date_range(start='2022-07-01', end='2022-07-31', freq='W-SUN')
# w_list = df_range.tolist()
# print(df_range)
# print(len(w_list))
date_range = pd.date_range(start='2022-06-01', periods=30)
df = pd.DataFrame(data=date_range, columns=['day'])
df['day_of_year'] = df['day'].dt.dayofyear
print(df)
df_date = pd.DataFrame(data={
    'norm': np.random.normal(loc=0, scale=1, size=1000),
    'uniform': np.random.uniform(low=0, high=1, size=1000),
    'binomial': np.random.binomial(n=1, p=0.2, size=1000)
},
    index=pd.date_range(start='2022-01-01', periods=1000))
print(df_date)